package edu.learn.service.impl;


import edu.learn.entity.Student;
import edu.learn.mapper.StudentMapper;
import edu.learn.service.IStudentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IStudentsServiceImpl implements IStudentsService {
    @Autowired
    StudentMapper studentMapper;

    @Override
    public void insertOne(Student student) {
        studentMapper.addStudent(student);
    }

    @Override
    public Student findStudentByid(Long id) {
        Student student = studentMapper.findStudentById(id);
        return student;
    }
}
